package vg.services.user_interface_manager.interfaces;

import java.util.Observer;

import javax.swing.Icon;
import javax.swing.JComponent;


/**
 * This class determines methods for elements of user interface.
 * @author tzolotuhin
 */
public abstract class AUserInterfaceElement implements Observer {
	protected final String _title; // title of element of user interface
	protected final Icon _icon; // icon of element of user interface
	/**
	 * Constructor.
	 * @param title - title of element of user interface(m.b. null).
	 * @param icon - icon of element of user interface(m.b. null).
	 */
	public AUserInterfaceElement(String title, Icon icon) {
		this._title = title;
		this._icon  = icon;
	}
	public String getTitleComponent() {
		return _title;
	}
	public Icon getIconComponent() {
		return _icon;
	}
//=============================================================================
//----------Abstract methods---------------------------------------------------
	public abstract JComponent getView();
}
